package com.hunliji.monitor.share.component.redis.enums;

import lombok.Getter;

/**
 * redis键值
 * @author wuchen
 */
@Getter
public enum RedisKeyEnum {
    /**
     * 飞书的缓存
     */
    FEI_SHU_TOKEN(RedisPackageSceneEnum.CACHE),
    /**
     * 飞书的gitlab缓存
     */
    GITLAB_FEI_SHU_TOKEN(RedisPackageSceneEnum.CACHE)
    ;

    private RedisPackageSceneEnum scene;

    RedisKeyEnum(RedisPackageSceneEnum scene) {
        this.scene = scene;
    }

    public static RedisKeyEnum getByName(String name){
        RedisKeyEnum[] redisKeyEnums = RedisKeyEnum.values();
        for (RedisKeyEnum redisKeyEnum:redisKeyEnums){
            if(redisKeyEnum.name().equals(name)){
                return redisKeyEnum;
            }
        }
        return null;
    }
}
